﻿<Window x:Class="Hammer_store.Begin_UserVerification"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Hammer_store"
        mc:Ignorable="d"
        Height="270" Width="400" 
        ResizeMode="NoResize" 
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent" 
        MouseLeftButtonDown="dragMe" 
        Icon="Resources/Images/logo2.png"
        Title="Hammer store (Добро пожаловать)">
    
    
    <Window.Resources>
        
        <!--** Кастомная кнопка "Да" **-->
        <Style x:Key="FocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
        <SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
        <SolidColorBrush x:Key="Button.MouseOver.Background" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.MouseOver.Border" Color="White"/>
        <SolidColorBrush x:Key="Button.Pressed.Background" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Pressed.Border" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
        <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
        <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
        <Style x:Key="buttonYes" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
            <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
            <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefaulted" Value="true">
                                <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                                <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
        <!--** Кастомная кнопка "Нет, я еще новенький" **-->
        <Style x:Key="FocusVisual1">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="Button.Static.Background1" Color="#FFDDDDDD"/>
        <SolidColorBrush x:Key="Button.Static.Border1" Color="#FF707070"/>
        <SolidColorBrush x:Key="Button.MouseOver.Background1" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.MouseOver.Border1" Color="White"/>
        <SolidColorBrush x:Key="Button.Pressed.Background1" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Pressed.Border1" Color="Transparent"/>
        <SolidColorBrush x:Key="Button.Disabled.Background1" Color="#FFF4F4F4"/>
        <SolidColorBrush x:Key="Button.Disabled.Border1" Color="#FFADB2B5"/>
        <SolidColorBrush x:Key="Button.Disabled.Foreground1" Color="#FF838383"/>
        <Style x:Key="buttonNo" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual1}"/>
            <Setter Property="Background" Value="{StaticResource Button.Static.Background1}"/>
            <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border1}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
                            <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsDefaulted" Value="true">
                                <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background1}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border1}"/>
                            </Trigger>
                            <Trigger Property="IsPressed" Value="true">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background1}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border1}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background1}"/>
                                <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border1}"/>
                                <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground1}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    
    
    <!--** Градиентовая рамка **-->
    <Border CornerRadius="5" 
            BorderThickness="5">

        <Border.BorderBrush>
            <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                <GradientStop Color="#FF661579" Offset="0.0"/>
                <GradientStop Color="#282c36" Offset="0.5"/>
                <GradientStop Color="#FF661579" Offset="1.0"/>
            </LinearGradientBrush>
        </Border.BorderBrush>


        <!--** Сетка **-->
        <Grid>
            <!--** Фоновый цвет для сетки **-->
            <Grid.Background>
                <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                    <GradientStop Color="#FF661579" Offset="0.0"/>
                    <GradientStop Color="#282c36" Offset="0.5"/>
                    <GradientStop Color="#FF661579" Offset="1.0"/>
                </LinearGradientBrush>
            </Grid.Background>

            <!--** Стек **-->
            <StackPanel>
                
                <!--* Заголовок на форме *-->
                <Label Content="Hammer store" 
                       HorizontalAlignment="Center"
                       Foreground="White" 
                       FontFamily="Fregat" 
                       FontSize="30" 
                       Margin="0 10 0 0"
                       Background="Black" 
                       BorderThickness="2" 
                       BorderBrush="#FFFBFAFA">

                    <Label.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="5"/>
                        </Style>
                    </Label.Resources>
                    
                    <Label.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Label.Effect>

                </Label>

                <!--* Вопрос *-->
                <Label Content="ВЫ УЖЕ ЗАРЕГИСТРИРОВАНЫ?" 
                       HorizontalAlignment="Center" 
                       Margin="0, 10, 0, 0" 
                       FontSize="20" 
                       FontFamily="Fregat" 
                       Foreground="White"/>

                <!--* Кнопка "Да" *-->
                <Button Style="{DynamicResource buttonYes}" 
                        x:Name="button_YES" 
                        Content="Да" 
                        VerticalAlignment="Top" 
                        Height="70" Margin="60 10 60 10" 
                        FontFamily="Fregat"
                        FontSize="30"
                        Foreground="White"
                        BorderBrush="Gray"
                        BorderThickness="2"
                        Click="button_YES_Click" >
                    
                    <!--Закругленные углы-->
                    <Button.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                    Value="5"/>
                        </Style>
                        
                    </Button.Resources>
                    <Button.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Button.Effect>

                    <!--Градиентовый фон для кнопки-->
                    <Button.Background>
                        <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                            <GradientStop Color="#282c36" Offset="0.0"/>
                            <GradientStop Color="#FF661579" Offset="0.5"/>
                            <GradientStop Color="#282c36" Offset="1.0"/>
                        </LinearGradientBrush>
                    </Button.Background>
                    
                </Button>

                <!--* Кнопка "Нет" *-->
                <Button Style="{DynamicResource buttonNo}" 
                        x:Name="button_NO" 
                        Content="Нет, я еще новенький" 
                        VerticalAlignment="Top" 
                        Height="60" 
                        FontFamily="Fregat"
                        FontSize="20" 
                        Margin="60 0 60 0"
                        Foreground="White"
                        BorderBrush="Gray"
                        Click="button_NO_Click" 
                        BorderThickness="2">
                    
                    <!--Закругленные углы-->
                    <Button.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" 
                                    Value="5"/>
                        </Style>
                        
                    </Button.Resources>

                    <Button.Effect>
                        <DropShadowEffect Direction="270" BlurRadius="10"/>
                    </Button.Effect>

                    <!--Градиентовый фон для кнопки-->
                    <Button.Background>
                        <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
                            <GradientStop Color="#282c36" Offset="0.0"/>
                            <GradientStop Color="#FF661579" Offset="0.5"/>
                            <GradientStop Color="#282c36" Offset="1.0"/>
                        </LinearGradientBrush>
                    </Button.Background>
                    
                </Button>
            </StackPanel>

            
            <!--Изображение для закрытия формы-->
            <Image x:Name="Image_cross"
                   Width="35"
                   Height="35"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Top"
                   Margin="0 0 0 0"
                   MouseDown="Image_cross_MouseDown">
                
                <Image.Effect>
                    <DropShadowEffect Direction="270" BlurRadius="10"/>
                </Image.Effect>

                <!--Триггер для отображения второй картинки-->
                <Image.Style>
                    <Style TargetType="{x:Type Image}">
                        <Setter Property="Source" 
                                Value="Resources/Images/cross_NotActivate.png"/>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_cross}" 
                                             Value="True">
                                <Setter Property="Source" 
                                        Value="Resources/Images/cross_Activate.png"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Image.Style>

            </Image>

        </Grid>
    </Border>
</Window>
